using System.Collections.Generic;
using System.Linq;
using EPiServer.Common.Tags;

namespace OpenWaves.ActivityFeed.EPiServer.Community
{
    public static class TagExtensions
    {
        public static IEnumerable<Topic> AsTopics(this TagCollection tags)
        {
            return tags.Select(AsTopic);
        }

        public static Topic AsTopic(this ITag t)
        {
            return new Topic("EpiServerCommunityTag/" + t.ID);
        }
    }
}